package com.deram.ctin.serv.system.api;

import com.deram.ctin.serv.system.entity.SystemUser;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by xhw on 2017/09/13.
 */

@FeignClient("serv-system")
@RequestMapping("/systemUserApi")
public interface SystemUserApi {

    @GetMapping("/find")
    SystemUser find(@RequestParam("id") Long id);

    @GetMapping("/findByUsername")
    SystemUser findByUsername(@RequestParam("username") String username);

    @PostMapping("/create")
    SystemUser create(@RequestBody SystemUser param);

    @PostMapping("/updatePassword")
    void updatePassword(@RequestParam("id") Long id, @RequestParam("newPassword") String newPassword);

    @PostMapping("/delete")
    void delete(@RequestParam("id") Long id);
}
